package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import org.flixel.FlxGame;
	import view.viewControllers.GameViewController;
	import view.viewControllers.RootViewController;
	
	/**
	 * ...
	 * @author Gaz Williams
	 * 
	 * bootstrap for onebuttonzelda game
	 * 
	 */
	
	[SWF(width="640", height="512", backgroundColor="#000000")]
	public class Main extends Sprite 
	{
		
		private var oneButtonZelda:FlxGame;
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			oneButtonZelda = new RootViewController(320, 256, GameViewController, 2);
			addChild(oneButtonZelda);
			
			//hold a reference because of gc.
			
		}
		
	}
	
}